package com.epoint.mobileoa.bizlogic.mobileoa;

import java.util.HashMap;

import android.os.Message;

import com.epoint.mobileoa.bizlogic.SuperView;
import com.epoint.mobileoa.bizlogic.Task;
import com.epoint.mobileoa.http.HttpHelp;

/**
 * @author liyc
 * @time 2012-2-22 上午10:33:55
 * @annotation 
 */
public class TestConnectionTask extends Task {

	public TestConnectionTask(SuperView con, HashMap<String, Object> param) {
		super(con, param);
		
	}

	@Override
	public void exectue(Message mess) throws Exception {
		String newurl = (String)getParam().get("newurl");
		String seamurl = newurl+"?requestType=CheckConnection";
		String bs = HttpHelp.getHttpBackWithNOCheck(seamurl);
		String result = "";
		if(bs.equals(HttpHelp.RESPONSEINFO_SUCCESS)){
			result = "true";
		}
		else{
			result = "false";
		}
		setMessageToRefreshUI(mess, getCon(), result);
	}

}
